#include <iostream>
#include <vector>
using namespace std;

void solve() {
    int n = 0;
    cin >> n;
    int temp = (n - 1) * 2;
    int ans = 0;
    while(temp>0) {
        ans += temp;
        temp -= 4;
    }
    cout << ans / 2 + 1<<endl;

}

int main()
{
    int t = 0;
    cin >> t;
    while (t--) {
        solve();
    }
    return 0;
}